<div class="content-wrapper">
    <section class="content-header">
        <h1>{$customer?'编辑':'新增'}客户</h1>
        <ol class="breadcrumb">
            <li><a href="/admin"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li class="active">客户管理</li>
            <li class="active"><a href="/admin/itemCate/cateList">客户列表</a></li>
            <li class="active">{$customer?'编辑':'新增'}客户</li>
        </ol>
    </section>
    <section class="content">
        <div class="box">
            <div class="box-header with-border">
            </div>
            <div class="box-body">
                <fieldset disabled>
                <form class="form-horizontal" role="form" action="javascrip:;" method="post">
                    <input type="hidden" name="id" id="id" value="{$customer.id}" />
                    <input type="hidden" name="admin_id" id="admin_id" value="{$customer.admin_id}" />
                    <div class="form-group">
                        <label for="level" class="col-sm-3 control-label"> 客户级别 </label>
                        <div class="col-sm-6">
                            <select class="form-control" id="level" name="level">
                                <foreach name="levelList" item="level_val" key="l_key">
                                    <option value="{$l_key}" <if condition="$l_key eq $customer.level ">selected</if>>{$level_val}</option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="type" class="col-sm-3 control-label"> 客户类别 </label>
                        <div class="col-sm-6">
                            <select class="form-control" id="type" name="type">
                                <foreach name="typeList" item="type_val" key="t_key">
                                    <option value="{$t_key}" <if condition="$t_key eq $customer.type ">selected</if>>{$type_val}</option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="company_name" class="col-sm-3 control-label"> 公司名称<span style="color: #f00;">*</span> </label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="company_name" name="company_name" value="{$customer.company_name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="product_name" class="col-sm-3 control-label"> 推广产品<span style="color: #f00;">*</span> </label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="product_name" name="product_name" value="{$customer.product_name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="name" class="col-sm-3 control-label"> 联系人<span style="color: #f00;">*</span> </label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="name" name="name" value="{$customer.name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="gender" class="col-sm-3 control-label"> 联系人性别 </label>
                        <div class="col-sm-6">
                            <select class="form-control" id="gender" name="gender">
                                <option value="1" <if condition="$customer.gender eq 1 ">selected</if>>男</option>
                                <option value="2" <if condition="$customer.gender eq 2 ">selected</if>>女</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="mobile" class="col-sm-3 control-label"> 手机号<span style="color: #f00;">*</span> </label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="mobile" name="mobile" value="{$customer.mobile}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="tel" class="col-sm-3 control-label"> 固话 </label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="tel" name="tel" value="{$customer.tel}" placeholder="0101-4088888">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="wechat" class="col-sm-3 control-label"> 微信 </label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="wechat" name="wechat" value="{$customer.wechat}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="qq" class="col-sm-3 control-label"> QQ </label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="qq" name="qq" value="{$customer.qq}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="cid" class="col-sm-3 control-label"> 选择产品一级名称 </label>
                        <div class="col-sm-6">
                            <select class="form-control" id="cid" name="cid">
                                <foreach name="p_cate" item="p">
                                    <option value="{$p.id}" <if condition="$p.id eq $customer.cid ">selected</if>>{$p.name}</option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="status" class="col-sm-3 control-label"> 客户状态 </label>
                        <div class="col-sm-6">
                            <select class="form-control" id="status" name="status">
                                <foreach name="statusList" item="status_val" key="s_key">
                                    <option value="{$s_key}" <if condition="$s_key eq $customer.status ">selected</if>>{$status_val}</option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="phase" class="col-sm-3 control-label"> 客户阶段 </label>
                        <div class="col-sm-6">
                            <select class="form-control" id="phase" name="phase">
                                <foreach name="phaseList" item="phase_val" key="p_key">
                                    <option value="{$p_key}" <if condition="$p_key eq $customer.phase ">selected</if>>{$phase_val}</option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    <if condition="$customer.status eq 5">
                        <div class="form-group">
                            <label for="refuse_reason" class="col-sm-3 control-label"> 拒绝原因： </label>
                            <div class="col-sm-6">
                                <p type="text" class="form-control" id="refuse_reason">{$customer.refuse_reason}</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="update_time" class="col-sm-3 control-label"> 操作时间： </label>
                            <div class="col-sm-6">
                                <p type="text" class="form-control" id="update_time">{$customer.update_time}</p>
                            </div>
                        </div>
                    </if>
                </form>
                </fieldset>
            </div>
        </div>
    </section>
</div>